package com.demo.bean;

/**
 * 全局响应体
 * @author Administrator
 *
 * @param <T>
 */
public class ResponseResult<T> {

	Integer code;//[200代表业务执行成功 500代表业务执行不成功]
	String message;//前端收到的字符串提示
	T data;//前端希望收到的数据
	
	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public ResponseResult() {
		code = 500;
		message ="响应";
	}
	public ResponseResult(Integer code, String message) {
		super();
		this.code = code;
		this.message = message;
	}
	public ResponseResult(Integer code, String message, T data) {
		super();
		this.code = code;
		this.message = message;
		this.data = data;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public T getData() {
		return data;
	}
	public void setData(T data) {
		this.data = data;
	}
	
}